Skip to main content link. Accesskey S
  • Help
  • HCL Logo
  • HCL Notes and Domino Application Development wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL Forums and Blogs
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • API Documentation
Search
Community Articles > Developing Applications > Developing XPage Applications > XPage Samples > How to use Social Enabler Sametime controls of XPages Extension Library
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

JMeter で XPages アプリケーションをテストする、入門編

JMeter を初めて使う方にむけて、Domino アプリケーションや XPages アプリケーションを JMeter でテストをするための手順を最初のステップから解説します。

Eclipse Memory Analyser Tool を使用した、XPages のメモリリークの調査

Java アプリケーションのメモリリークを調査する強力なツールである Eclipse Memory Analyser Tool を使用して、XPages アプリケーションのメモリリークを調査する方法について紹介します。

XSP クライアントサイド Javascript オブジェクト関数

XPages アプリケーション開発の中で利用できる、XSP クライアントサイド Javascript オブジェクト関数について解説します。

Lotus Notes Java クラスのリサイクルとメモリ消費の検証

XPages や Java エージェントなどで Lotus Notes を操作する Lotus Notes Java クラスでは、開発者が明示的にリサイクルをして使用したオブジェクトを開放する必要があります。このリサイクルを適切に行わないことで、Java クラスの

XPages アプリケーションでの「可視(rendered)」プロパティによるパフォーマンス低下への対策

XPages アプリケーション開発で、「可視」設定ので「値の計算」はパフォーマンス低下を招く可能性があります。「可視」評価の Javascript に複雑な処理を実装する必要があるときには、そのスクリプトでパフォーマンスの低
Community articleHow to use Social Enabler Sametime controls of XPages Extension Library
Added by ~Justin Elwemarynds | Edited by ~Justin Elwemarynds on February 7, 2013 | Version 19
  • Actions Show Menu▼
expanded Abstract
collapsed Abstract
This document explains how to included Sametime livename and Web Client components in to your XPages application with using Social Enable Sametime Controls of XPages Extension Library. The content of this article are create based on XPages Extension Library on Domino and Domino Designer 8.5.3.
Tags: Social Enabler, Sametime
ShowTable of Contents
HideTable of Contents
  • 1 Introduction
    • 1.1 FQHN for Domino
  • 2 Configuration of the Social Enabler environment for Sametime
    • 2.1 Installing XPages Extension Library
    • 2.2 Try the Social Enabler sample application
  • 3 Controls for connecting Sametine in Social Enabler
  • 4 Preparing your application to including Sametime Controls
    • 4.1 Configure your application before using Sametime Controls
    • 4.2 Add Endpoint Configuration
    • 4.3 Copy re-usable XPage and Custom Controls
  • 5 Including Sametime Controls in you application
    • 5.1 Adding login page to Sametime
      • 5.1.1 "BasicAuthenticationPanel" Custom Control
      • 5.1.2 "sbtLoginDialog" Custom Control
      • 5.1.3 "sbtLoginSection" Custom Control
    • 5.2 Adding Livename component with using Computed Field Control
    • 5.3 Adding Livename component with using Sametime Widget Control
    • 5.4 Adding Web Client with using Sametime Widget Control

Introduction

The Sametime Controls are included in Social Enabler of XPages Extension Library. With the Sametime controls you can include Sametime awareness and instant message function in you XPages application easily. The Social Enbler Sametime controls leverages Sametime Web Client technology which were introduced in Sametime 8.5. The Sametime Web Client technology provided Dojo based web client user experience based on Dojo Library and available with Sametime Proxy server component.
This article explains how to included Sametime livename and Web Client components in to your XPages application with using Social Enable Sametime Controls of XPages Extension Library. The content of this article are create based on XPages Extension Library on Domino and Domino Designer 8.5.3.

FQHN for Domino

When you are trying Sametime connectivity of Social Enabler in XPages Extension Library, its UI may not be displayed correctly because of cross-site-scripting restriction. To avoide this problem you have to configure your Domino to be accesable with FQHN with the same domain with Sametime.

For example, as Lotus Greenhouse's sametime is accesable with greenhouse.lotus.com, your Domino have to be configure to be accessable with my_domino.lotus.com. This configuration can be done via Domino configuratoin, or you can just add my_domino.lotus.com entry in your client's hosts file.

Configuration of the Social Enabler environment for Sametime

Installing XPages Extension Library

The standard installation procedure for XPages Extension Library are described in the following article:
 
XPages Extension Library Deployment in Domino 8.5.3 and IBM XWork Serverexternal link

After installatin of XPages Extension Library, execute the following procedure to create "OAuth Token Store" database:

  1. Copy the WebSecurityStore.ntf to you Domino data folder from XPages Extension Library package.
  2. Open the WebSecurityStore.ntf with your Domino Administraion Client or Domino Designer and sign the template.
  3. Create WebSecurityStore.nsf application (do not change the filename) with your favolite application name from the template.

Social Enabler allows your XPages application connects to many Social and Cloud services, and some additional configuration might be required for connecting certain services after installing XPages Extension Library. However for Sametime connection, required configuration are already included XPages Extension Library sample application for Lotus Greenhouseexternal link Sametime service and you can try the Sametime connectivity just after installation.

Completing the installation of XPages Extension Library, now you can try the Sametime connectivity of Social Eanbler. Before trying sample application, make sure that you have account on the Lotus Greenhouseexternal link. The sample application use the Sametime server on Lotus Greenhouseexternal link .

Try the Social Enabler sample application

The Social Enabler sample application is provided as XPagesSBT.nsf in XPages Extension Library release package. Try the Sametime Control sample with the following steps:
 
  1. Copy the XPagesSBT.nsf to you Domino data folder
  2. Open the XPagesSBT.nsf with your Domino Administration Client or Domino Designer and sign the application. Then add appropriate ACL entry to the NSF file for test access. But it is recommended no to allow anonymous access to the application, because user's authentication info (username and password) will be stored in "OAuth Token Store" database (WebSecurityStore.nsf) associated with authenticated Domino user name.
  3. On Web browser, open the NSF file with the URL: http:///XPagesSBT.nsf/
  4. Click "Sametime" tab to open Samtime Control sample page.
  5. As "Livename" section is selected in the left pane, click "Login" link or "Login to Sametime" link. Then type in your username and password for Lotus Greenhouse on login dialog or login pane.
  6. When you have successfully logged in, your names are displayed with Sametime status as Live name
XPages Social Enabler Demo - Sametime
 
Now you Social enbler environment are configured for Sametime and verified it works.
 

Controls for connecting Sametine in Social Enabler

In Social Enabler environment, you have two Sametime specific controls and one generic control to display Sametime Livename and WebClient on you XPages Application

Category Control name Description
Core Controls Computed Field With specifying designated contentType attribute, this control can show Sametime Livename.
Social Business Toolkit Sametime Client This control loads the desired Sametime resources with the page. If the resources are not loaded, then none of the Sametime widgets will be rendered.
  Sametime Widget This control instanciate a Dojo dijit in relationship with the sametime client. It does not render if no sametime client already rendered in the page.
Although the Sametime Client Control would not show any UI component, it is always used along with other controls. The Computed Field Control can be used to show Sametime Livename and Sametime Widget Control is used to show Sametime Livename or Sametime Web Client Widget.
 

Preparing your application to including Sametime Controls

Configure your application before using Sametime Controls

To included the Sametime Controls in you application, you have to configure your application to work with Social Enabler.
  1. Open Application Properties and select "Advanced" tab, the check the following two libraries in "XPages Libraries" seciotn
    • com.ibm.xsp.extlib.library
    • com.ibm.xsp.extlibx.library
  2. On "XPages" tab, it is recommended to specify "oneuiv2.1" for "Application Theme" of "Theme Defaults" section. It will make Social Enabler UI component to be show better.
 

Add Endpoint Configuration

The endpoint configuration tell Social Enabler component to where the Sametime connection will be established. The faces-config.xml file contains the managed bean configurations for JavaServer Faces container and endpoint is defined as attribute of the managed bean.
To see the faces-config.xml, you have to open Package Explorer view by selecting [Window] - [Show Eclipse Views ] - [Package Explorer], then open \WEB-INF folder in the Package Explorer view. If you are just trying to connect to the Lotus Greenhouse Sametime server from your application, you can copy the contents from faces-config.xml in XPagesSBT.nsf to your application. Two managed-bean definitions of "PwdStore" and "greenhouseSametime"are required to use the Sametime connection.
 

	<?xml version="1.0" encoding="UTF-8"?>
	<faces-config>
	  <!--
	        Password store physical implementation.
	    -->
	  <managed-bean>
	    <managed-bean-name>PwdStore</managed-bean-name>
	    <managed-bean-class>com.ibm.xsp.extlib.sbt.security.password.store.BANSFPasswordStore
	</managed-bean-class>
	    <managed-bean-scope>application</managed-bean-scope>
	    <managed-property>
	      <property-name>database</property-name>
	      <value>WebSecurityStore.nsf</value>
	    </managed-property>
	  </managed-bean>
	  <!--
	   Greenhouse Sametime 
	   -->
	  <managed-bean>
	    <managed-bean-name>greenhouseSametime</managed-bean-name>
	    <managed-bean-class>com.ibm.xsp.extlib.sbt.services.client.endpoints.SameTimeEndpoint
	</managed-bean-class>
	    <managed-bean-scope>session</managed-bean-scope>
	    <managed-property>
	      <property-name>url</property-name>
	      <value>https://greenhouse.lotus.com</value>
	    </managed-property>
	    <managed-property>
	      <property-name>passwordStore</property-name>
	      <value>PwdStore</value>
	    </managed-property>
	    <managed-property>
	      <property-name>authenticationPage</property-name>
	      <value>_BasicLogin?endpoint=greenhouseSametime</value>
	    </managed-property>
	  </managed-bean>
	</faces-config>
	

 

The endpoint defined here is needed to be added to xsp.properties file. In same folder with faces-config.xml, you can find xsp.properties. Open xsp.properties, add the following line and save it.


	extlib.endpoint.sametime=greenhouseSametime

	
 

Copy re-usable XPage and Custom Controls

The XPagesSBT.nsf sample application contains re-usable XPage and Custom Controls which will help you to develop you Sametime connectivity development. We recommend you to copy the following re-usable components into you application.
 
Design Element Design Name Description
XPage _BasicLogin.xsp Basic login page with user name and password.
Custom Controls BasicAuthenticationPanel.xsp Provides a link to open _BasciLogin.xsp
  sbtLoginDialog.xsp Provides link to open login dialog
  sbtLoginPage.xsp Sub component used in _BasicLogin.xsp
  sbtLoginPanel.xsp Sub component used in sbtLoginDialog.xsp and sbtLoginSection.xsp
  sbtLoginSection.xsp Provides link to open login section
 

Including Sametime Controls in you application

Now you can included Sametime Controls into your application. This section explains the following topics:
  • Adding login page to Sametime
  • Adding Livename component with using Computed Field Control
  • Adding Livename component with using Sametime Widget Control
  • Adding Web Client with using Sametime Widget Control
 
In any case, Sametime Client Controls have to be included to creates the sametime client. It holds the Sametime parameters for different Sametime components and is required on the page to use the Sametime features. If it is not on the page, or not rendered, then the other Sametime controls will behave like if they're not connected to Sametime server.
 

Adding login page to Sametime

The Social Enabler Sametime connectivity allow your application login to Sametime server with basic authentication with username and password. Using one of he following three Custom Controls, you can add Sametim login page in your XPages Aplication:
 

"BasicAuthenticationPanel" Custom Control

 
You have to specify the following Custom Properties:
  • endpoint
Basic Authentication link

Basic Authentication Login page

 

	<?xml version="1.0" encoding="UTF-8"?>

	<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex"

	   xmlns:xc="http://www.ibm.com/xsp/custom">

	   <xe:sametimeClient id="sametimeClient1" autoLogin="true"

	       clientScriptFile="livename" autoTunnelURI="true">

	   </xe:sametimeClient>

	   <xc:BasicAuthenticationPanel endpoint="sametime"></xc:BasicAuthenticationPanel>

	</xp:view>

	
 

"sbtLoginDialog" Custom Control

You have to specify the following Custom Properties:

  • dialogTitle
  • Label
  • endpoint
 
Login Dialog
 

	<?xml version="1.0" encoding="UTF-8"?>

	<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex"

	    xmlns:xc="http://www.ibm.com/xsp/custom">

	    <xe:sametimeClient id="sametimeClient1" autoLogin="true"

	        clientScriptFile="livename" autoTunnelURI="true">

	    </xe:sametimeClient>

	    Login Dialog:

	    <xc:sbtLoginDialog id="loginDialog" dialogTitle="Login To Sametime"

	        endpoint="sametime" label="Login To Sametime">

	    </xc:sbtLoginDialog>

	</xp:view>
	
 

"sbtLoginSection" Custom Control

 
You have to specify the following Custom Properties:
  • dialogTitle
  • Label
  • endpoint
 

Login Section

	<?xml version="1.0" encoding="UTF-8"?>

	<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex"

	    xmlns:xc="http://www.ibm.com/xsp/custom">

	    <xe:sametimeClient id="sametimeClient1" autoLogin="true"

	        clientScriptFile="livename" autoTunnelURI="true">

	    </xe:sametimeClient>

	    Login Section:

	    <xc:sbtLoginSection id="sbtLoginSection1"

	        sectionTitle="Login To Sametime" endpoint="sametime" label="Login To Sametime">

	    </xc:sbtLoginSection>

	</xp:view>
	

 

Adding Livename component with using Computed Field Control

Computed Filed Control can be used to display Livename by specifing contentType="xs:st.livename"

	<xp:text escape="true" id="computedField8" contentType="xs:st.livename">

	    <xp:this.value><![CDATA[#{"UserID|Display Name"}]]></xp:this.value>

	</xp:text>
	

or


	<xp:text escape="true" id="computedField7"

	            contentType="xs:st.livename">

	            <xp:this.value><![CDATA[#{javascript:"UserID|Display Name"}]]></xp:this.value>

	</xp:text>
	
 
The value format is "Sametime User ID | Display Name".
 
To get my own ID, the following script @Endpoint("sametime").getUserIdentity() can be used:
 

	<xp:text escape="true" id="computedField3" contentType="xs:st.livename">

	        <xp:this.value><![CDATA[#{javascript:@Endpoint("sametime").getUserIdentity()+"|[user display name]"}]]></xp:this.value>

	</xp:text>
	
 
The full XPage source code is written as the following:

	<?xml version="1.0" encoding="UTF-8"?>

	<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex"

	    xmlns:xc="http://www.ibm.com/xsp/custom">

	    <xe:sametimeClient id="sametimeClient1" autoLogin="true"

	        clientScriptFile="livename" autoTunnelURI="true">

	    </xe:sametimeClient>

	    Here is an example with the id and a display name set:

	    <xp:text escape="true" id="computedField3" contentType="xs:st.livename">

	        <xp:this.value><![CDATA[#{javascript:@Endpoint("sametime").getUserIdentity()+"|[user display name]"}]]></xp:this.value>

	    </xp:text>

	</xp:view>
	
 

Adding Livename component with using Sametime Widget Control

Sametime Livename can be added with using Sametime Widget Control

	<?xml version="1.0" encoding="UTF-8"?>

	<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex"

	    xmlns:xc="http://www.ibm.com/xsp/custom">

	    <xe:sametimeClient id="sametimeClient1" autoLogin="true"

	        clientScriptFile="livename" autoTunnelURI="true">

	    </xe:sametimeClient>

	    Here is an example using a sametime widget:

	    <xe:sametimeWidget id="sametimeWidget1" dojoType="sametime.LiveName">

	        <xe:this.dojoAttributes>

	            <xp:dojoAttribute name="userId">

	                <xp:this.value><![CDATA[#{javascript:@Endpoint("sametime").getUserIdentity()}]]></xp:this.value>

	            </xp:dojoAttribute>

	        </xe:this.dojoAttributes>

	    </xe:sametimeWidget>

	    <xp:br></xp:br>

	</xp:view>
	
 

Adding Web Client with using Sametime Widget Control

Sametime Web Client can be added using Ssmetimg Widget Control with dojoType="sametime.WebClient" attribute.
 
Sametime Web Client

 


	<?xml version="1.0" encoding="UTF-8"?>

	<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex"

	    xmlns:xc="http://www.ibm.com/xsp/custom">

	    <xp:br></xp:br>

	    <xe:sametimeClient id="sametimeClient1" autoLogin="true"

	        autoTunnelURI="true" clientScriptFile="widgets">

	    </xe:sametimeClient>

	    Sametime WebClient:

	    <xp:br />

	    <xe:sametimeWidget id="sametimeWidget1" dojoType="sametime.WebClient"></xe:sametimeWidget>

	    <xp:br></xp:br>

	</xp:view>
	


  • Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (19)
collapsed Versions (19)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (19)Feb 7, 2013, 5:22:23 AM~Justin Elwemarynds  
18Dec 21, 2012, 7:04:54 AM~Rebecca Minfreevitchobu  
17Dec 21, 2012, 6:47:53 AM~Rebecca Minfreevitchobu  
16Dec 21, 2012, 6:37:05 AM~Rebecca Minfreevitchobu  
15Dec 21, 2012, 6:24:33 AM~Rebecca Minfreevitchobu  
14Dec 21, 2012, 6:13:19 AM~Rebecca Minfreevitchobu  
13Dec 21, 2012, 5:58:18 AM~Rebecca Minfreevitchobu  
12Dec 21, 2012, 5:52:57 AM~Rebecca Minfreevitchobu  
11Dec 21, 2012, 5:30:31 AM~Rebecca Minfreevitchobu  
10Dec 11, 2012, 4:49:48 PM~Rebecca Minfreevitchobu  
9Dec 11, 2012, 4:44:10 PM~Rebecca Minfreevitchobu  
8Dec 11, 2012, 4:19:21 PM~Rebecca Minfreevitchobu  
7Dec 11, 2012, 4:18:20 PM~Rebecca Minfreevitchobu  
6Dec 11, 2012, 4:16:27 PM~Rebecca Minfreevitchobu  
5Dec 11, 2012, 4:13:42 PM~Rebecca Minfreevitchobu  
4Dec 11, 2012, 4:08:07 PM~Rebecca Minfreevitchobu  
3Dec 11, 2012, 4:04:00 PM~Rebecca Minfreevitchobu  
2Dec 11, 2012, 3:57:35 PM~Rebecca Minfreevitchobu  
1Dec 11, 2012, 3:53:51 PM~Rebecca Minfreevitchobu  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL
  • Privacy
  • Accessibility